<?php
// 错误报告
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

$_SERVER['PATH_INFO'] = isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : (isset($_SERVER['REDIRECT_URL']) ? $_SERVER['REDIRECT_URL'] : null);

// 调试信息
if (isset($_GET['phpinfo']) || ('/phpinfo' == $_SERVER['PATH_INFO']) ) {
	phpinfo();
	exit;
}

// 虚拟主机配置
define('URL_HOST', $_SERVER['SERVER_NAME']);
$_VHOSTS = include 'vhosts.php';



// 包含入口文件
if (array_key_exists(URL_HOST, $_VHOSTS) && @include $_VHOSTS[URL_HOST]) {
	//
} else {
	# echo URL_HOST;
	include $_VHOSTS[''];
}
